package com.example.prom.ok.y2022.controller.email.aliyun.controller;

import com.example.prom.ok.y2022.controller.email.aliyun.model.AliEmailSignModel;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("aliyun/email")
public class AliyunEmailController {

    @PostMapping("sign")
    public String sign(HttpServletRequest request, AliEmailSignModel model){
        String env_id = request.getParameter("env_id");
        String msg_id = request.getParameter("msg_id");
        String authorization = request.getHeader("Authorization");
        System.out.println(env_id);
        System.out.println(msg_id);
        System.out.println(authorization);
        String method = request.getMethod();
        System.out.println(method);
        System.out.println(model.toString());
        return request.getRequestURI();
    }
}
